<?php
/**
 * @Author:: HuangYin
 * @DateTime: 2017-02-14 9:24
 *
 * @Description:
 */

/**
 * @api {post} authLogin 用户 - 登录授权
 * @apiVersion 1.0.0
 * @apiName authLogin
 * @apiGroup Auth
 *
 * @apiParam {string}       username    用户名
 * @apiParam {string}       password    密码
 *
 * @apiParamExample {json} Request-Example:
 *     {
 *          "username": "admin",
 *          "password": "admin",
 *     }
 *
 * @apiSuccess {string}     resultType  状态 [1:success, 2:failure]
 * @apiSuccess {string}     resultMsg   消息
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *      {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "resultMsg": "登录成功！",
 *              "resultType": "success",
 *              "resultCode": 200
 *          }
 *      }
 */

/**
 * @api {post} searchStore 门店 - 搜索
 * @apiVersion 1.0.0
 * @apiName searchStore
 * @apiGroup Store
 *
 * @apiParam    {string}    keyword     关键字
 *
 * @apiParamExample {json} Request-Example:
 *     {
 *          "keyword": "紫金",
 *     }
 *
 * @apiSuccess {string}     resultType  状态 [1:success, 2:failure]
 * @apiSuccess {string}     resultMsg   消息
 * @apiSuccess {string}     resultData  数据
 * @apiSuccess {int}        storeId     门店 ID
 * @apiSuccess {string}     storeName   门店名称
 * @apiSuccess {string}     shopkeeper  店长
 * @apiSuccess {string}     tel         电话
 * @apiSuccess {string}     address     地址
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "resultType": "success",
 *              "resultMsg": "success",
 *              "resultData": [
 *                  {
 *                      "storeId": 1,
 *                      "storeName": "紫金广场店",
 *                      "shopkeeper": "毛毛",
 *                      "tel": "02386235692",
 *                      "address": "重庆市渝北区紫金广场"
 *                  }
 *              ]
 *          }
 *      }
 */

/**
 * @api {post} matchingStore 门店 - 匹配
 * @apiVersion 1.0.0
 * @apiName matchingStore
 * @apiGroup Store
 *
 * @apiParam    {string}    storeName   门店名称
 * @apiParam    {string}    shopkeeper  店长
 * @apiParam    {string}    phone       手机号
 *
 * @apiParamExample {json} Request-Example:
 *     {
 *          "storeName": "紫金广场店",
 *          "shopkeeper": "毛毛",
 *          "phone": "15157123839",
 *     }
 *
 * @apiSuccess {string}     resultType  状态 [1:success, 2:failure]
 * @apiSuccess {string}     resultMsg   消息
 * @apiSuccess {string}     resultData  数据
 * @apiSuccess {int}        storeId     门店 ID
 * @apiSuccess {string}     storeName   门店名称
 * @apiSuccess {int}        uid         店长 ID
 * @apiSuccess {string}     phone       手机
 * @apiSuccess {string}     shopkeeper  店长
 * @apiSuccess {string}     tel         电话
 * @apiSuccess {string}     address     地址
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "resultType": "success",
 *              "resultMsg": "success",
 *              "resultData": {
 *                   "storeId": 1,
 *                   "storeName": "紫金广场店",
 *                   "uid": 1,
 *                   "phone": "15157123839",
 *                   "shopkeeper": "毛毛",
 *                   "tel": "02386235692",
 *                   "address": "重庆市渝北区紫金广场"
 *               }
 *          }
 *      }
 */
 
/**
 * @api {post} syncCreatedStore 门店 - 创建店长
 * @apiVersion 1.0.0
 * @apiName syncCreatedStore
 * @apiGroup Store
 *
 * @apiParam    {int}    	storeId   	门店名称
 * @apiParam    {string}    storeName   门店名称
 * @apiParam    {string}    shopkeeper  店长
 * @apiParam    {string}    phone       手机号
 *
 * @apiParamExample {json} Request-Example:
 *     {
 *          "storeId": 1,
 *          "storeName": "紫金广场店",
 *          "shopkeeper": "毛毛",
 *          "phone": "15157123839",
 *     }
 *
 * @apiSuccess {string}     resultType  状态 [1:success, 2:failure]
 * @apiSuccess {string}     resultMsg   消息
 * @apiSuccess {string}     resultData  数据
 * @apiSuccess {int}        uid         店长 ID
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "resultType": "success",
 *              "resultMsg": "success",
 *              "resultData": {
 *                   "uid": 1,
 *               }
 *          }
 *      }
 */

/**
 * @api {post} syncUpdatedStore 门店 - 修改店长
 * @apiVersion 1.0.0
 * @apiName syncUpdatedStore
 * @apiGroup Store
 *
 * @apiParam    {int}    	uid		   	门店名称
 * @apiParam    {string}    storeName   门店名称
 * @apiParam    {string}    shopkeeper  店长
 * @apiParam    {string}    phone       手机号
 *
 * @apiParamExample {json} Request-Example:
 *     {
 *          "uid": 1,
 *          "storeName": "紫金广场店",
 *          "shopkeeper": "毛毛",
 *          "phone": "15157123839",
 *     }
 *
 * @apiSuccess {string}     resultType  状态 [1:success, 2:failure]
 * @apiSuccess {string}     resultMsg   消息
 * @apiSuccess {string}     resultData  数据
 * @apiSuccess {int}        uid         店长 ID
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "resultType": "success",
 *              "resultMsg": "success",
 *              "resultData": true
 *          }
 *      }
 */ 
 
/**
 * @api {post} faqList 常见问题 - 列表
 * @apiVersion 1.0.0
 * @apiName faqList
 * @apiGroup Faq
 *
 * @apiParam    {int}       maxId       最大 ID
 *
 * @apiParamExample {json} Request-Example:
 *     {
 *          "maxId": 10
 *     }
 *
 * @apiSuccess {string}     resultType  状态 [1:success, 2:failure]
 * @apiSuccess {string}     resultMsg   消息
 * @apiSuccess {string}     resultData  数据
 * @apiSuccess {int}        faqId       常见问题 ID
 * @apiSuccess {string}     title       常见问题标题
 * @apiSuccess {string}     content     常见问题内容
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "resultType": "success",
 *              "resultMsg": "success",
 *              "resultData": [
 *                  {
 *                      "faqId": 1,
 *                      "title": "不能上网可否收银？",
 *                      "content": "不能上网可否收银，不能上网可否收银，不能上网可否收银，不能上网可否收银"
 *                  }
 *              ]
 *          }
 *      }
 */

/**
 * @api {post} feedbackList 在线反馈 - 列表
 * @apiVersion 1.0.0
 * @apiName feedbackList
 * @apiGroup Feedback
 *
 * @apiParam    {int}       storeId     门店 ID
 * @apiParam    {int}       maxId       最大 ID
 *
 * @apiParamExample {json} Request-Example:
 *     {
 *          "storeId": 1,
 *          "maxId": 10,
 *     }
 *
 * @apiSuccess {string}     resultType  状态 [1:success, 2:failure]
 * @apiSuccess {string}     resultMsg   消息
 * @apiSuccess {string}     resultData  数据
 * @apiSuccess {int}        feedbackId  反馈 ID
 * @apiSuccess {int}        storeId     门店 ID
 * @apiSuccess {int}        quoteId     引用 ID
 * @apiSuccess {string}     content     反馈内容
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "resultType": "success",
 *              "resultMsg": "success",
 *              "resultData": [
 *                  {
 *                      "feedbackId": 1,
 *                      "storeId": 1,
 *                      "quoteId": 1,
 *                      "content": "不能上网，请求支援~"
 *                  }
 *              ]
 *          }
 *      }
 */

/**
 * @api {post} createdFeedback 在线反馈 - 创建
 * @apiVersion 1.0.0
 * @apiName createdFeedback
 * @apiGroup Feedback
 *
 * @apiParam    {int}       storeId     门店 ID
 * @apiParam    {int}       quoteId     引用 ID
 * @apiParam    {string}    content     反馈内容
 *
 * @apiParamExample {json} Request-Example:
 *     {
 *          "storeId": 1,
 *          "quote_id": 9,
 *          "content": "你个浪个不能上网啊~",
 *     }
 *
 * @apiSuccess {string}     resultType  状态 [1:success, 2:failure]
 * @apiSuccess {string}     resultMsg   消息
 * @apiSuccess {string}     resultData  数据
 * @apiSuccess {int}        feedbackId 在线反馈 ID
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "resultType": "success",
 *              "resultMsg": "success",
 *              "resultData": [
 *                  {
 *                      "feedbackId": 1
 *                  }
 *              ]
 *          }
 *      }
 */

/**
 * @api {post} syncGoodsInventory 商品 - 同步库存
 * @apiVersion 1.0.0
 * @apiName syncGoodsInventory
 * @apiGroup Goods
 *
 * @apiParam    {int}       storeId     门店 ID
 * @apiParam    {int}       goodsId     商品 ID
 * @apiParam    {int}       counts      库存减数
 *
 * @apiParamExample {json} Request-Example:
 *     {
 *          "storeId": 1,
 *          {
 *              "goodsId": 9,
 *              "counts": 5,
 *          }
 *     }
 *
 * @apiSuccess {string}     resultType  状态 [1:success, 2:failure]
 * @apiSuccess {string}     resultMsg   消息
 * @apiSuccess {string}     resultData  数据
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "resultType": "success",
 *              "resultMsg": "success",
 *              "resultData": true
 *          }
 *      }
 */

/**
 * @api {post} syncGoodsList 商品 - 列表
 * @apiVersion 1.0.0
 * @apiName syncGoodsList
 * @apiGroup Goods
 *
 * @apiParam    {int}       maxId       最大 ID
 *
 * @apiParamExample {json} Request-Example:
 *     {
 *          "maxId": 10,
 *     }
 *
 * @apiSuccess {string}     resultType  状态 [1:success, 2:failure]
 * @apiSuccess {string}     resultMsg   消息
 * @apiSuccess {string}     resultData  数据
 * @apiSuccess {int}        goodsId     商品 ID
 * @apiSuccess {int}        categoryId  分类 ID
 * @apiSuccess {string}     articleNo   货号
 * @apiSuccess {string}     barCode     条形码
 * @apiSuccess {string}     zhName      中文名称
 * @apiSuccess {string}     enName      英文名称
 * @apiSuccess {string}     mnemonic    助记码
 * @apiSuccess {string}     brand       品牌
 * @apiSuccess {string}     tax         税额
 * @apiSuccess {string}     price       价格
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "resultType": "success",
 *              "resultMsg": "success",
 *              "resultData": [
 *                  {
 *                      "goodsId": 1,
 *                      "categoryId": 1,
 *                      "articleNo": 1,
 *                      "barCode": 1,
 *                      "zhName": 1,
 *                      "enName": 1,
 *                      "mnemonic": 1,
 *                      "brand": 1,
 *                      "tax": 1,
 *                      "price": 1,
 *                  }
 *              ]
 *          }
 *      }
 */

/**
 * @api {post} findByNumber 会员 - 卡号返回详情
 * @apiVersion 1.0.0
 * @apiName findByNumber
 * @apiGroup Member
 *
 * @apiParam    {string}    number     卡号
 *
 * @apiParamExample {json} Request-Example:
 *     {
 *          "number": "20170213",
 *     }
 *
 * @apiSuccess {string}     resultType  状态 [1:success, 2:failure]
 * @apiSuccess {string}     resultMsg   消息
 * @apiSuccess {string}     resultData  数据
 * @apiSuccess {int}        id          门店 ID
 * @apiSuccess {int}        uid         门店名称
 * @apiSuccess {string}     phone       手机
 * @apiSuccess {string}     number      卡号
 * @apiSuccess {string}     realName    真实姓名
 * @apiSuccess {int}        status      状态
 * @apiSuccess {string}     memo        备注
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "resultType": "success",
 *              "resultMsg": "success",
 *              "resultData": {
 *                    "id": 1,
 *                    "uid": 1,
 *                    "phone": "15157123838",
 *                    "number": "8888666644442222",
 *                    "realName": "黄尹",
 *                    "status": 1,
 *                    "memo": "Fuck"
 *               }
 *          }
 *      }
 */

/**
 * @api {post} findByPhone 会员 - 手机返回详情
 * @apiVersion 1.0.0
 * @apiName findByPhone
 * @apiGroup Member
 *
 * @apiParam    {string}    phone       手机
 *
 * @apiParamExample {json} Request-Example:
 *     {
 *          "phone": "15157123839",
 *     }
 *
 * @apiSuccess {string}     resultType  状态 [1:success, 2:failure]
 * @apiSuccess {string}     resultMsg   消息
 * @apiSuccess {string}     resultData  数据
 * @apiSuccess {int}        id          门店 ID
 * @apiSuccess {int}        uid         会员 ID
 * @apiSuccess {string}     phone       手机
 * @apiSuccess {string}     number      卡号
 * @apiSuccess {string}     realName    真实姓名
 * @apiSuccess {int}        status      状态
 * @apiSuccess {string}     memo        备注
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "resultType": "success",
 *              "resultMsg": "success",
 *              "resultData": {
 *                  "id": 1,
 *                  "uid": 1,
 *                  "phone": "15157123838",
 *                  "number": "8888666644442222",
 *                  "realName": "黄尹",
 *                  "status": 1,
 *                  "memo": "Fuck"
 *              }
 *          }
 *      }
 */
 
/**
 * @api {post} findById 会员 - 根据 ID 返回详情
 * @apiVersion 1.0.0
 * @apiName findById
 * @apiGroup Member
 *
 * @apiParam    {int}    	uid         会员 ID
 *
 * @apiParamExample {json} Request-Example:
 *     {
 *          "uid": 1,
 *     }
 *
 * @apiSuccess {string}     resultType  状态 [1:success, 2:failure]
 * @apiSuccess {string}     resultMsg   消息
 * @apiSuccess {string}     resultData  数据
 * @apiSuccess {int}        id          门店 ID
 * @apiSuccess {int}        uid         会员 ID
 * @apiSuccess {string}     phone       手机
 * @apiSuccess {string}     number      卡号
 * @apiSuccess {string}     realName    真实姓名
 * @apiSuccess {int}        status      状态
 * @apiSuccess {string}     memo        备注
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "resultType": "success",
 *              "resultMsg": "success",
 *              "resultData": {
 *                  "id": 1,
 *                  "uid": 1,
 *                  "phone": "15157123838",
 *                  "number": "8888666644442222",
 *                  "realName": "黄尹",
 *                  "status": 1,
 *                  "memo": "Fuck"
 *              }
 *          }
 *      }
 */ 

/**
 * @api {post} createdMember 会员 - 创建
 * @apiVersion 1.0.0
 * @apiName createdMember
 * @apiGroup Member
 *
 * @apiParam    {int}       storeId     门店 ID
 * @apiParam    {string}    phone       手机
 * @apiParam    {string}    number      卡号
 * @apiParam    {string}    realName    真实姓名
 * @apiParam    {string}    memo        备注
 *
 * @apiParamExample {json} Request-Example:
 *     {
 *          "storeId": 1,
 *          "phone": "15157123839",
 *          "number": "15157123839",
 *          "realName": "15157123839",
 *          "memo": "15157123839",
 *     }
 *
 * @apiSuccess {string}     resultType  状态 [1:success, 2:failure]
 * @apiSuccess {string}     resultMsg   消息
 * @apiSuccess {string}     resultData  数据
 * @apiSuccess {int}        uid         会员 ID
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "resultType": "success",
 *              "resultMsg": "success",
 *              "resultData": 10
 *          }
 *      }
 */

/**
 * @api {post} updatedMember 会员 - 更新
 * @apiVersion 1.0.0
 * @apiName updatedMember
 * @apiGroup Member
 *
 * @apiParam    {int}       uid         会员 ID
 * @apiParam    {string}    phone       手机
 * @apiParam    {string}    number      卡号
 * @apiParam    {string}    realName    真实姓名
 * @apiParam    {string}    memo        备注
 *
 * @apiParamExample {json} Request-Example:
 *     {
 *          "phone": "15157123839",
 *          "number": "15157123839",
 *          "realName": "15157123839",
 *          "memo": "15157123839",
 *     }
 *
 * @apiSuccess {string}     resultType  状态 [1:success, 2:failure]
 * @apiSuccess {string}     resultMsg   消息
 * @apiSuccess {string}     resultData  数据
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "resultType": "success",
 *              "resultMsg": "success",
 *              "resultData": true
 *          }
 *      }
 */

/**
 * @api {post} syncUpdateIntegral 会员 - 更新积分
 * @apiVersion 1.0.0
 * @apiName syncUpdateIntegral
 * @apiGroup Member
 *
 * @apiParam    {int}       uid         会员 ID
 * @apiParam    {float}     Integral    积分
 *
 * @apiParamExample {json} Request-Example:
 *     {
 *          "uid": 1,
 *          "integral": 1
 *     }
 *
 * @apiSuccess {string}     resultType  状态 [1:success, 2:failure]
 * @apiSuccess {string}     resultMsg   消息
 * @apiSuccess {string}     resultData  数据
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "resultType": "success",
 *              "resultMsg": "success",
 *              "resultData": true
 *          }
 *      }
 */

/**
 * @api {post} syncUpdateMoney 会员 - 更新余额
 * @apiVersion 1.0.0
 * @apiName syncUpdateMoney
 * @apiGroup Member
 *
 * @apiParam    {int}       uid         会员 ID
 * @apiParam    {decimal}   money       积分
 *
 * @apiParamExample {json} Request-Example:
 *     {
 *          "uid": 1,
 *          "money": 1
 *     }
 *
 * @apiSuccess {string}     resultType  状态 [1:success, 2:failure]
 * @apiSuccess {string}     resultMsg   消息
 * @apiSuccess {string}     resultData  数据
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "resultType": "success",
 *              "resultMsg": "success",
 *              "resultData": true
 *          }
 *      }
 */

/**
 * @api {post} memberList 会员 - 列表
 * @apiVersion 1.0.0
 * @apiName memberList
 * @apiGroup Member
 *
 * @apiParam    {int}       maxId       最大 ID
 *
 * @apiParamExample {json} Request-Example:
 *     {
 *          "maxId": 10,
 *     }
 *
 * @apiSuccess {string}     resultType  状态 [1:success, 2:failure]
 * @apiSuccess {string}     resultMsg   消息
 * @apiSuccess {string}     resultData  数据
 * @apiSuccess {int}        uid         会员 ID
 * @apiSuccess {string}     phone       手机
 * @apiSuccess {string}     number      卡号
 * @apiSuccess {string}     realName    真实姓名
 * @apiSuccess {string}     status      状态
 * @apiSuccess {string}     memo        备注
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "resultType": "success",
 *              "resultMsg": "success",
 *              "resultData": [
 *                  {
 *                      "uid": 1,
 *                      "phone": "15157123838",
 *                      "number": "8888666644442222",
 *                      "realName": "黄尹",
 *                      "status": 1,
 *                      "memo": "Fuck"
 *                  }
 *              ]
 *          }
 *      }
 */

/**
 * @api {post} memberIntegralList 会员积分 - 列表
 * @apiVersion 1.0.0
 * @apiName memberIntegralList
 * @apiGroup Member
 *
 * @apiParam    {int}       maxId       最大 ID
 *
 * @apiParamExample {json} Request-Example:
 *     {
 *          "maxId": 10,
 *     }
 *
 * @apiSuccess {string}     resultType  状态 [1:success, 2:failure]
 * @apiSuccess {string}     resultMsg   消息
 * @apiSuccess {string}     resultData  数据
 * @apiSuccess {int}        uid         会员 ID
 * @apiSuccess {int}        storeId     门店 ID
 * @apiSuccess {int}        type        类型[1:充值, 2:消费, 3消耗]
 * @apiSuccess {string}     integral    积分
 * @apiSuccess {string}     memo        备注
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "resultType": "success",
 *              "resultMsg": "success",
 *              "resultData": [
 *                  {
 *                      "uid": 1,
 *                      "storeId": 1,
 *                      "type": "8888666644442222",
 *                      "integral": 100,
 *                      "memo": "Fuck"
 *                  }
 *              ]
 *          }
 *      }
 */

/**
 * @api {post} createdMemberIntegral 会员积分 - 创建
 * @apiVersion 1.0.0
 * @apiName createdMemberIntegral
 * @apiGroup Member
 *
 * @apiParam {int}        uid             UID
 * @apiParam {int}        store_I         门店 ID
 * @apiParam {decimal}    integral        积分
 * @apiParam {int}        type            类型[1:消费, 2:消耗]
 * @apiParam {string}     memo            备注
 * @apiParam {int}        status          状态[1:成功, 2:失败]
 *
 *  @apiParamExample {json} Request-Example:
 *     {
 *       "uid": 1,
 *       "storeId": 1,
 *       "integral": 1,
 *       "type": 1,
 *       "memo": "langLiGeLang",
 *       "status": 1
 *     }
 *
 * @apiSuccess {int}        id          ID
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "id": 1
 *          }
 *     }
 */

/**
 * @api {post} updatedMemberIntegral 会员积分 - 更新
 * @apiVersion 1.0.0
 * @apiName updatedMemberIntegral
 * @apiGroup Member
 *
 * @apiParam {int}        uid             UID
 * @apiParam {int}        storeId         门店 ID
 * @apiParam {decimal}    integral        积分
 * @apiParam {int}        type            类型[1:消费, 2:消耗]
 * @apiParam {string}     memo            备注
 * @apiParam {int}        status          状态[1:成功, 2:失败]
 *
 * @apiParamExample {json} Request-Example:
 *     {
 *       "uid": 1,
 *       "integral": 1,
 *       "type": 1,
 *       "memo": "langLiGeLang",
 *       "status": 1
 *     }
 *
 * @apiSuccess {int}   id  充值 ID
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "id": 1
 *          }
 *     }
 */

/**
 * @api {post} memberIntegralHistory 会员积分 - 积分记录
 * @apiVersion 1.0.0
 * @apiName memberIntegralHistory
 * @apiGroup Member
 *
 * @apiParam    {int}       uid	       最大 ID
 *
 * @apiParamExample {json} Request-Example:
 *     {
 *          "uid": 1,
 *     }
 *
 * @apiSuccess {string}     resultType  状态 [1:success, 2:failure]
 * @apiSuccess {string}     resultMsg   消息
 * @apiSuccess {string}     resultData  数据
 * @apiSuccess {int}        uid         会员 ID
 * @apiSuccess {int}        storeId     门店 ID
 * @apiSuccess {int}        type        类型[1:充值, 2:消费]
 * @apiSuccess {decimal}    integral    积分
 * @apiSuccess {string}     memo        备注
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "resultType": "success",
 *              "resultMsg": "success",
 *              "resultData": [
 *                  {
 *                      "uid": 1,
 *                      "storeId": 1,
 *                      "type": "1",
 *                      "integral": 100,
 *                      "memo": "Fuck"
 *                  }
 *              ]
 *          }
 *      }
 */ 
 
/**
 * @api {post} memberRechargeList 会员充值 - 列表
 * @apiVersion 1.0.0
 * @apiName memberRechargeList
 * @apiGroup Member
 *
 * @apiParam    {int}       maxId       最大 ID
 *
 * @apiParamExample {json} Request-Example:
 *     {
 *          "maxId": 10,
 *     }
 *
 * @apiSuccess {string}     resultType  状态 [1:success, 2:failure]
 * @apiSuccess {string}     resultMsg   消息
 * @apiSuccess {string}     resultData  数据
 * @apiSuccess {int}        uid         会员 ID
 * @apiSuccess {int}        storeId     门店 ID
 * @apiSuccess {int}        type        类型[1:充值, 2:消费]
 * @apiSuccess {decimal}    money       金额
 * @apiSuccess {string}     memo        备注
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "resultType": "success",
 *              "resultMsg": "success",
 *              "resultData": [
 *                  {
 *                      "uid": 1,
 *                      "storeId": 1,
 *                      "type": "8888666644442222",
 *                      "money": 100,
 *                      "memo": "Fuck"
 *                  }
 *              ]
 *          }
 *      }
 */

/**
 * @api {post} createdMemberRecharge 会员充值 - 创建
 * @apiVersion 1.0.0
 * @apiName createdMemberRecharge
 * @apiGroup Member
 *
 * @apiParam {int}        uid             UID
 * @apiParam {int}        store_I         门店 ID
 * @apiParam {decimal}    money           金额
 * @apiParam {int}        type            类型[1:充值, 2:消费]
 * @apiParam {string}     memo            备注
 * @apiParam {int}        status          状态[1:成功, 2:失败]
 *
 *  @apiParamExample {json} Request-Example:
 *     {
 *       "uid": 1,
 *       "store_id": 1,
 *       "money": 1,
 *       "type": 1,
 *       "memo": "langLiGeLang",
 *       "status": 1
 *     }
 *
 * @apiSuccess {int}        id          ID
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "id": 1
 *          }
 *     }
 */

/**
 * @api {post} updatedMemberRecharge 会员充值 - 更新
 * @apiVersion 1.0.0
 * @apiName updatedMemberRecharge
 * @apiGroup Member
 *
 * @apiParam {int}        uid             UID
 * @apiParam {int}        store_id        门店 ID
 * @apiParam {decimal}    money           金额
 * @apiParam {int}        type            类型[1:充值, 2:消费]
 * @apiParam {string}     memo            备注
 * @apiParam {int}        status          状态[1:成功, 2:失败]
 *
 * @apiParamExample {json} Request-Example:
 *     {
 *       "uid": 1,
 *       "money": 1,
 *       "type": 1,
 *       "memo": "langLiGeLang",
 *       "status": 1
 *     }
 *
 * @apiSuccess {int}   id  充值 ID
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "id": 1
 *          }
 *     }
 */

/**
 * @api {post} memberRechargeHistory 会员充值 - 充值记录
 * @apiVersion 1.0.0
 * @apiName memberRechargeHistory
 * @apiGroup Member
 *
 * @apiParam    {int}       uid	       最大 ID
 *
 * @apiParamExample {json} Request-Example:
 *     {
 *          "uid": 1,
 *     }
 *
 * @apiSuccess {string}     resultType  状态 [1:success, 2:failure]
 * @apiSuccess {string}     resultMsg   消息
 * @apiSuccess {string}     resultData  数据
 * @apiSuccess {int}        uid         会员 ID
 * @apiSuccess {int}        storeId     门店 ID
 * @apiSuccess {int}        type        类型[1:充值, 2:消费]
 * @apiSuccess {decimal}    money       金额
 * @apiSuccess {string}     memo        备注
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "resultType": "success",
 *              "resultMsg": "success",
 *              "resultData": [
 *                  {
 *                      "uid": 1,
 *                      "storeId": 1,
 *                      "type": "1",
 *                      "money": 100,
 *                      "memo": "Fuck"
 *                  }
 *              ]
 *          }
 *      }
 */
 
/**
 * @api {post} createdOrder 订单 - 发起采购
 * @apiVersion 1.0.0
 * @apiName createdOrder
 * @apiGroup Order
 *
 * @apiParam    {int}       id          订单 ID
 * @apiParam    {int}       storeId     门店 ID
 * @apiParam    {string}    storeName   门店名称
 * @apiParam    {string}    shopkeeper  店长
 * @apiParam    {string}    phone       手机
 * @apiParam    {string}    tel         电话
 * @apiParam    {string}    number      订单号
 * @apiParam    {int}       id          订单详情 ID
 * @apiParam    {int}       orderId     订单 ID
 * @apiParam    {int}       goodsId     商品 ID
 * @apiParam    {string}    zhName      中文名称
 * @apiParam    {string}    enName      英文名称
 * @apiParam    {decimal}   price       价格
 * @apiParam    {int}       counts
 *
 * @apiParamExample {json} Request-Example:
 *      {
 *          "id": 1,
 *          "storeId": 1,
 *          "storeName": "紫金广场门店",
 *          "shopkeeper": "毛毛",
 *          "phone": "15157123839",
 *          "tel": "02388886666",
 *          "number": "20170206101756436",
 *          "status": 1,
 *          "detail": [
 *              {
 *                  "id": 1,
 *                  "orderId": 1,
 *                  "goodsId": 2,
 *                  "zhName": "香蕉",
 *                  "enName": "banner",
 *                  "price": "50.00",
 *                  "counts": 1
 *              }
 *          ]
 *      }
 *
 * @apiSuccess {string}     resultType  状态 [1:success, 2:failure]
 * @apiSuccess {string}     resultMsg   消息
 * @apiSuccess {string}     resultData  数据
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "resultType": "success",
 *              "resultMsg": "success",
 *              "resultData": true
 *          }
 *      }
 */

/**
 * @api {post} syncShopping 购物 - 同步购物
 * @apiVersion 1.0.0
 * @apiName createdShopping
 * @apiGroup Shopping
 *
 * @apiParam    {int}       id          购物 ID
 * @apiParam    {int}       uid         会员 ID
 * @apiParam    {string}    outTradeNo  购物单号
 * @apiParam    {string}    authCode    商户授权码
 * @apiParam    {string}    tradeNo     第三方交易号
 * @apiParam    {string}    cardAmount  会员卡支付金额
 * @apiParam    {string}    amount      其他支付金额
 * @apiParam    {int}       payType     支付方式
 * @apiParam    {int}       status      是否同步 [1:未同步,2:已同步]
 * @apiParam    {int}       payStatus	支付状态
 * @apiParam    {string}    createdAt	创建时间
 * @apiParam    {object}    detail      
 * @apiParam    {int}    	shoppingId  购物 ID
 * @apiParam    {int}    	goodsId     商品 ID
 * @apiParam    {string}    zhName      中文名称
 * @apiParam    {string}    enName      英文名称
 * @apiParam    {decimal}   price       价格
 * @apiParam    {int}       counts		数量
 * @apiParam    {string}    createdAt	创建时间
 *
 * @apiParamExample {json} Request-Example:
 *      [{
 *          "id": 2,
 *		    "uid": 1,
 *		    "admin_id": 1,
 *		    "outTradeNo": "20170224115326952",
 *		    "authCode": "20170206110514739",
 *		    "tradeNo": "0",
 *		    "cardAmount": "500.00",
 *		    "amount": "0.00",
 *		    "payType": 6,
 *		    "status": 1,
 *		    "payStatus": 1,
 *		    "created_at": "2017-02-26 17:05:58",
 *		    "detail": [
 *		      {
 *		        "id": 2,
 *		        "shopping_id": 2,
 *		        "goods_id": 1,
 *		        "zhName": "香蕉1",
 *		        "enName": "banner",
 *		        "price": "50.00",
 *		        "counts": 1,
 *		        "created_at": "2017-02-24 11:53:26"
 *		      }
 *		    ]
 *      }]
 *
 * @apiSuccess {string}     resultType  状态 [1:success, 2:failure]
 * @apiSuccess {string}     resultMsg   消息
 * @apiSuccess {string}     resultData  数据
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "resultType": "success",
 *              "resultMsg": "success",
 *              "resultData": true
 *          }
 *      }
 */
 
/**
 * @api {post} syncRefund 购物 - 同步退货
 * @apiVersion 1.0.0
 * @apiName createdRefund
 * @apiGroup Refund
 *
 * @apiParam    {int}       id          购物 ID
 * @apiParam    {int}       uid         会员 ID
 * @apiParam    {string}    outTradeNo  购物单号
 * @apiParam    {string}    authCode    商户授权码
 * @apiParam    {string}    tradeNo     第三方交易号
 * @apiParam    {string}    cardAmount  会员卡支付金额
 * @apiParam    {string}    amount      其他支付金额
 * @apiParam    {int}       payType     支付方式
 * @apiParam    {int}       status      是否同步 [1:未同步,2:已同步]
 * @apiParam    {int}       payStatus	支付状态
 * @apiParam    {string}    createdAt	创建时间
 * @apiParam    {object}    detail      
 * @apiParam    {int}    	refundId    退货 ID
 * @apiParam    {int}    	goodsId     商品 ID
 * @apiParam    {string}    zhName      中文名称
 * @apiParam    {string}    enName      英文名称
 * @apiParam    {decimal}   price       价格
 * @apiParam    {int}       counts		数量
 * @apiParam    {string}    createdAt	创建时间
 *
 * @apiParamExample {json} Request-Example:
 *      [{
 *          "id": 2,
 *		    "uid": 1,
 *		    "admin_id": 1,
 *		    "outTradeNo": "20170224115326952",
 *		    "authCode": "20170206110514739",
 *		    "tradeNo": "0",
 *		    "cardAmount": "500.00",
 *		    "amount": "0.00",
 *		    "payType": 6,
 *		    "status": 1,
 *		    "payStatus": 1,
 *		    "createdAt": "2017-02-26 17:05:58",
 *		    "detail": [
 *		      {
 *		        "id": 2,
 *		        "refundId": 2,
 *		        "goodsId": 1,
 *		        "zhName": "香蕉1",
 *		        "enName": "banner",
 *		        "price": "50.00",
 *		        "counts": 1,
 *		        "createdAt": "2017-02-24 11:53:26"
 *		      }
 *		    ]
 *      }]
 *
 * @apiSuccess {string}     resultType  状态 [1:success, 2:failure]
 * @apiSuccess {string}     resultMsg   消息
 * @apiSuccess {string}     resultData  数据
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "resultType": "success",
 *              "resultMsg": "success",
 *              "resultData": true
 *          }
 *      }
 */ 
 
/**
 * @api {post} createdRegistration 登记 - 创建
 * @apiVersion 1.0.0
 * @apiName createdRegistration
 * @apiGroup Registration
 *
 * @apiParam    {int}       storeId     门店 ID
 * @apiParam    {int}       uid         管理员 ID
 * @apiParam    {int}       type        登记类型
 * @apiParam    {string}    memo        备注
 *
 * @apiParamExample {json} Request-Example:
 *     {
 *          "storeId": 1,
 *          "uid": 1,
 *          "type": 1,
 *          "memo": "商品损坏"
 *     }
 *
 * @apiSuccess {string}     resultType  状态 [1:success, 2:failure]
 * @apiSuccess {string}     resultMsg   消息
 * @apiSuccess {string}     resultData  数据
 *
 * @apiSuccessExample Success-Response:
 *     HTTP/1.1 200 OK
 *     {
 *          "code": 200,
 *          "message": "",
 *          "data": {
 *              "resultType": "success",
 *              "resultMsg": "success",
 *              "resultData": true
 *          }
 *      }
 */